package a.h;

import javax.swing.table.AbstractTableModel;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.Iterator;

final class ce
  extends AbstractTableModel
{
  private final PropertyChangeListener a = new b_(null);
  private db c;
  static Class d;
  
  public ce(db paramdb)
  {
    if (ec.t == 0)
    {
      if (paramdb == null) {
        throw new IllegalArgumentException("Invalid root: " + paramdb);
      }
      this.c = paramdb;
    }
    this.c.a(this.a);
  }
  
  public void a(db paramdb)
  {
    if (ec.t == 0)
    {
      if (paramdb == null) {
        throw new IllegalArgumentException("Invalid root: " + paramdb);
      }
      this.c.b(this.a);
      this.c = paramdb;
    }
    this.c.a(this.a);
    fireTableDataChanged();
  }
  
  public int getColumnCount()
  {
    return 3;
  }
  
  public int getRowCount()
  {
    int j = ec.t;
    boolean bool = ec.s;
    int i = 0;
    Iterator localIterator = this.c.b();
    do
    {
      do
      {
        eb localeb;
        do
        {
          pb localpb;
          do
          {
            if (!localIterator.hasNext()) {
              break;
            }
            localpb = (pb)localIterator.next();
            i++;
          } while (!localpb.g());
          localeb = (eb)localpb;
          if ((j != 0) || (bool)) {
            break label94;
          }
        } while (!localeb.m());
        i += localeb.a();
      } while (j != 0);
    } while (!bool);
    label94:
    return i;
  }
  
  public Object getValueAt(int paramInt1, int paramInt2)
  {
    int k = ec.t;
    boolean bool = ec.s;
    int i = 0;
    Iterator localIterator1 = this.c.b();
    label161:
    label165:
    do
    {
      do
      {
        eb localeb;
        do
        {
          pb localpb;
          do
          {
            if (!localIterator1.hasNext()) {
              break;
            }
            localpb = (pb)localIterator1.next();
            if (k == 0)
            {
              if (i == paramInt1) {
                return localpb;
              }
              i++;
            }
          } while (!localpb.g());
          localeb = (eb)localpb;
        } while ((k == 0) && (!localeb.m()));
        int j = 0;
        Iterator localIterator2 = localeb.b();
        do
        {
          do
          {
            if (!localIterator2.hasNext()) {
              break;
            }
            f localf = (f)localIterator2.next();
            if (k != 0) {
              break label165;
            }
            if (bool) {
              break label161;
            }
            if (i + j == paramInt1) {
              return localf;
            }
            j++;
          } while (!bool);
        } while (k != 0);
        i += localeb.a();
      } while (k != 0);
    } while (!bool);
    return null;
  }
  
  public void setValueAt(Object paramObject, int paramInt1, int paramInt2)
  {
    int i = ec.t;
    pb localpb = (pb)getValueAt(paramInt1, paramInt2);
    Object localObject;
    if (i == 0) {
      if (paramInt2 == 0)
      {
        localObject = (eb)localpb;
        boolean bool1 = ((eb)localObject).m();
        boolean bool2 = ((Boolean)paramObject).booleanValue();
        if (i == 0)
        {
          if (bool1 == bool2) {
            return;
          }
          ((eb)localObject).a(bool2);
          fireTableDataChanged();
        }
        if ((i == 0) && (!ec.s)) {
          return;
        }
      }
    }
    if (paramInt2 == 2)
    {
      localObject = (f)localpb;
      ((f)localObject).a(paramObject);
    }
  }
  
  public boolean isCellEditable(int paramInt1, int paramInt2)
  {
    int i = ec.t;
    if (i == 0) {
      switch (paramInt2)
      {
      case 0: 
        return false;
      case 2: 
        pb localpb = (pb)getValueAt(paramInt1, 0);
        if ((i != 0) || (!localpb.g())) {
          if (i != 0) {}
        }
        return localpb.i();
      }
    }
    return false;
  }
  
  public Class getColumnClass(int paramInt)
  {
    if (ec.t == 0) {}
    return d == null ? (ce.d = a("a.h.pb")) : d;
  }
  
  boolean a(int paramInt)
  {
    return ((pb)getValueAt(paramInt, 0)).g();
  }
  
  db a()
  {
    return this.c;
  }
  
  static Class a(String paramString)
  {
    try
    {
      return Class.forName(paramString);
    }
    catch (ClassNotFoundException localClassNotFoundException)
    {
      throw new NoClassDefFoundError(localClassNotFoundException.getMessage());
    }
  }
  
  private final class b_
    implements PropertyChangeListener
  {
    private b_() {}
    
    public void propertyChange(PropertyChangeEvent paramPropertyChangeEvent)
    {
      int j = ec.t;
      Object localObject = paramPropertyChangeEvent.getSource();
      if ((j != 0) || ((localObject instanceof pb)))
      {
        int i = a(localObject);
        if (j == 0)
        {
          if (i > -1) {
            ce.this.c.j();
          }
        }
        else {
          ce.this.fireTableRowsUpdated(i, i);
        }
      }
    }
    
    private int a(Object paramObject)
    {
      int k = ec.t;
      boolean bool = ec.s;
      int i = 0;
      Iterator localIterator1 = ce.this.c.b();
      label144:
      do
      {
        do
        {
          eb localeb;
          do
          {
            pb localpb;
            do
            {
              if (!localIterator1.hasNext()) {
                break;
              }
              localpb = (pb)localIterator1.next();
              if (localpb == paramObject) {
                return i;
              }
              i++;
            } while (!localpb.g());
            localeb = (eb)localpb;
            if ((k != 0) || (bool)) {
              break label168;
            }
          } while (!localeb.m());
          int j = 0;
          Iterator localIterator2 = localeb.b();
          do
          {
            do
            {
              if (!localIterator2.hasNext()) {
                break label144;
              }
              f localf = (f)localIterator2.next();
              if (bool) {
                break;
              }
              if (localf == paramObject) {
                return i + j;
              }
              j++;
            } while (!bool);
            i += localeb.a();
          } while (k != 0);
        } while (k != 0);
      } while (!bool);
      label168:
      return -1;
    }
    
    b_(ce.0 param0)
    {
      this();
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.h.ce

 * JD-Core Version:    0.7.0.1

 */